/PROG  PNS0142
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "2HF_1311/1312";
PROG_SIZE	= 3560;
CREATE		= DATE 25-01-21  TIME 05:18:44;
MODIFIED	= DATE 25-01-21  TIME 05:18:44;
FILE_NAME	= PNS0041;
VERSION		= 0;
LINE_COUNT	= 126;
MEMORY_SIZE	= 4024;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: RL1 ;
   6:  !  PROGRAM: PNS0047 ;
   7:  !  PART:53160691/93 ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14]=90    ;
  13:  R[18]=1    ;
  14:  R[19]=.2    ;
  15:  R[35]=TIMER[4]    ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:  CALL ARM_CHECK    ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  27:  DO[43]=PULSE,1.0sec ;
  28:  R[1]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5] ;
  34:   ;
  35:  TIMER[2]=STOP ;
  36:  R[1]=R[1]+1    ;
  37:  R[2]=TIMER[2]    ;
  38:  R[3]=60/R[2]    ;
  39:  TIMER[2]=RESET ;
  40:  TIMER[2]=START ;
  41:   ;
  42:  !PROCEED TO PICK ;
  43:  LBL[20] ;
  44:  IF DI[1]=ON AND DI[8]=ON,JMP LBL[25] ;
  45:  IF DI[29]=ON,JMP LBL[90] ;
  46:  JMP LBL[20] ;
  47:   ;
  48:  LBL[25] ;
  49:  OVERRIDE=R[5] ;
  50:   ;
  51:J P[3:PICK APPROACH] 100% CNT100 ACC100    ;
  52:   ;
  53:  DO[1]=OFF ;
  54:J P[4] 50% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  55:  PAYLOAD[2] ;
  56:  CALL CHK_PICK    ;
  57:J P[5:PICK DEPART] 100% CNT70 ACC100    ;
  58:   ;
  59:   ;
  60:  DO[44]=PULSE,1.0sec ;
  61:  CALL CHECK_PICK    ;
  62:  DO[1]=ON ;
  63:  DO[8]=PULSE,1.0sec ;
  64:  MONITOR Z_CHECH ;
  65:J P[7:PICK CLEAR] 100% CNT100 ACC100 DB  500.0mm,CALL END_PICK    ;
  66:   ;
  67:  LBL[30:GOTO DROP POUNCE] ;
  68:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  69:  OVERRIDE=R[5] ;
  70:   ;
  71:  LBL[40:AT DROP POUNCE] ;
  72:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  73:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  74:  IF DI[18]=ON,JMP LBL[60] ;
  75:  JMP LBL[40] ;
  76:   ;
  77:  LBL[50:MOVE DROP SNEAK] ;
  78:  OVERRIDE=R[5] ;
  79:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  80:  LBL[51:DROP OR C-P-S] ;
  81:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  82:  IF DI[18]=ON,JMP LBL[40] ;
  83:  JMP LBL[51] ;
  84:  JMP LBL[50] ;
  85:   ;
  86:  LBL[60:MOVE CLS-PRS-ACC] ;
  87:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  88:  PAUSE ;
  89:  JMP LBL[30] ;
  90:   ;
  91:  LBL[80:DROP ENABLED] ;
  92:  !PROCEED TO DROP ;
  93:  TIMER[4]=RESET ;
  94:  TIMER[4]=START ;
  95:   ;
  96:  DO[4]=OFF ;
  97:  OVERRIDE=R[5] ;
  98:J P[10:DROP APPROACH] 80% CNT10 ACC100    ;
  99:  MONITOR END Z_CHECH ;
 100:J P[11:DROP] 50% CNT5 TB R[19]sec,CALL PARTDROP_L ACC110 BREAK    ;
 101:J P[20] 100% CNT100    ;
 102:J P[22:DROP] 100% CNT70    ;
 103:  //DO[1]=OFF ;
 104:J P[21:DROP] 45% CNT0 TB R[18]sec,CALL PARTDROP_R ACC100 BREAK    ;
 105:J P[23] 100% CNT100    ;
 106:  PAYLOAD[1] ;
 107:  CALL CHK_DROP    ;
 108:  OVERRIDE=R[5] ;
 109:J P[12:DROP DEPART] 100% CNT100 ACC130    ;
 110:  TIMER[4]=STOP ;
 111:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 112:  DO[6]=PULSE,1.0sec ;
 113:   ;
 114:  !GOTO PICK POUNCE ;
 115:J P[2:PICK POUNCE] 100% CNT100 ACC100    ;
 116:  DO[43]=PULSE,1.0sec ;
 117:  IF DI[29]=ON,JMP LBL[90] ;
 118:  JMP LBL[10] ;
 119:   ;
 120:  LBL[90:END OF CYCLE] ;
 121:  TIMER[1]=STOP ;
 122:  R[4]=TIMER[1]    ;
 123:J P[1:MIDDLE] 50% CNT100    ;
 124:  MOVE TO HOME    ;
 125:   ;
 126:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2613.039  mm,	Y =    16.985  mm,	Z =  -680.000  mm,
	W =  -179.895 deg,	P =     -.122 deg,	R =   -90.003 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2753.313  mm,	Y =   153.241  mm,	Z =  -785.200  mm,
	W =  -179.382 deg,	P =      .004 deg,	R =   -90.015 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2669.298  mm,	Y =   -29.402  mm,	Z =  -929.628  mm,
	W =   179.994 deg,	P =      .001 deg,	R =   -90.003 deg
};
P[4]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2669.283  mm,	Y =   -29.380  mm,	Z = -1032.398  mm,
	W =   179.995 deg,	P =      .001 deg,	R =   -90.004 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2669.233  mm,	Y =   -29.479  mm,	Z =  -868.233  mm,
	W =   179.990 deg,	P =      .001 deg,	R =   -90.005 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2600.000  mm,	Y =  -228.890  mm,	Z =  -788.260  mm,
	W =  -179.652 deg,	P =      .276 deg,	R =   -89.784 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2600.000  mm,	Y = -1554.138  mm,	Z =  -829.488  mm,
	W =   179.848 deg,	P =      .372 deg,	R =   -88.458 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2499.999  mm,	Y = -2242.174  mm,	Z =  -831.489  mm,
	W =   179.532 deg,	P =      .775 deg,	R =   -89.026 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2407.615  mm,	Y = -3414.218  mm,	Z =  -926.944  mm,
	W =  -179.863 deg,	P =    -1.730 deg,	R =   -89.745 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2407.615  mm,	Y = -3414.218  mm,	Z = -1042.144  mm,
	W =  -179.863 deg,	P =    -1.730 deg,	R =   -89.745 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2170.872  mm,	Y = -3056.676  mm,	Z =  -914.956  mm,
	W =  -179.854 deg,	P =     -.269 deg,	R =   -91.749 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2745.992  mm,	Y = -1485.654  mm,	Z =  -751.939  mm,
	W =   179.534 deg,	P =     1.153 deg,	R =   -89.332 deg
};
P[20]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2407.615  mm,	Y = -3414.218  mm,	Z =  -926.944  mm,
	W =  -179.863 deg,	P =    -1.730 deg,	R =   -89.745 deg
};
P[21:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2371.027  mm,	Y = -3410.033  mm,	Z = -1044.479  mm,
	W =  -179.857 deg,	P =    -1.737 deg,	R =   -89.303 deg
};
P[22:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2371.027  mm,	Y = -3410.034  mm,	Z =  -932.639  mm,
	W =  -179.857 deg,	P =    -1.737 deg,	R =   -89.303 deg
};
P[23]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2371.027  mm,	Y = -3410.034  mm,	Z =  -932.639  mm,
	W =  -179.857 deg,	P =    -1.737 deg,	R =   -89.303 deg
};
/END
